/** text: string | value: any */
export interface EnumElement {
    text: string;
    value: any;
}

export interface EnumCollection {
    code: string;
    enums: EnumElement[];
}

/** no/yes */
export const NormalIsOrNot: EnumElement[] = [
    {
        value: 0,
        text: '否'
    }, {
        value: 1,
        text: '是'
    }
]

/** cancel\confirm */
export const NormalConfirmOrCancel: EnumElement[] = [
    {
        value: 0,
        text: '取消'
    }, {
        value: 1,
        text: '确定'
    }
]

/** close\open\switch */
export const NormalTurnOnOrTurnOff: EnumElement[] = [
    {
        value: 0,
        text: '关闭'
    }, {
        value: 1,
        text: '打开'
    }, {
        value: 2,
        text: '切换'
    }
]

export const NormalShowOrHide: EnumElement[] = [
    {
        value: false,
        text: '隐藏'
    }, {
        value: true,
        text: '显示'
    }
]

/** The definition of all pre defined normal enums. */
export const EnumList: EnumCollection[] = [
    {
        code: 'normalIsOrNot',
        enums: NormalIsOrNot
    }, {
        code: 'normalConfirmOrCancel',
        enums: NormalConfirmOrCancel
    }, {
        code: 'normalTurnOnOrTurnOff',
        enums: NormalTurnOnOrTurnOff
    }, {
        code: 'normalShowOrHide',
        enums: NormalShowOrHide
    }
]